import { Spin } from 'antd';
import { useAppStore } from '~/stores/app';

export function GlobalLoading() {
  const loading = useAppStore((state) => state.loading);

  if (!loading) return null;

  return (
    <div className="fixed inset-0 flex items-center justify-center bg-black/50 z-50">
      <Spin size="large" />
    </div>
  );
}